*****************************************************************************************************************************************************
* PROJECT: 		Exposure to the COVID-19 Stock Market Crash and its Effect on Household Expectations
* DATE: 		Nov 2020
* CONTENT: 		FIGURES
* AUTHORS: 		Tobin Hanspal, Johannes Wohlfart, Anni Weber
*****************************************************************************************************************************************************

		clear all
		set scheme lean2
		global pm = char(177)
		set more off
		gl date = c(current_date)
		graph set window fontface "cmr10"
		
		
* set cd as /Replication_files_HanspalWeberWohlfart2020/
						
						
*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~	
** FIGURES A10
*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~	
	
use data/processed/data_1, clear 
keep if control_pure==1 |control_fincrisis==1 | control_dotcom==1 | control_black==1 

	*~ constraint
	gen h_constrained=(constrained>3)
	gen h_retired = (retired==1)

	*~ age 
	gen h_age=(age>48)
	tab hhnetinc_19 if hhnetinc19_NR==0

	*~ net income 
	gen h_netinc=(hhnetinc_19>4)
	gen h_netinc_alt=(hhnetinc_19>3)
	replace h_netinc=. if hhnetinc19_NR==1

	*~ other financial wealth 
	drop h_ofinwealth_lvl 
	sum ofinwealth_lvl, d
	gen h_ofinwealth_lvl=(ofinwealth_lvl>0)

	*~ net wealth 
	sum netwealth_Jan20, d
	gen h_netwealth=(netwealth_Jan20<r(p50))

	*~ recovery duration own net income  
	replace recov_owninc_duration=0 if recov_owninc_duration<0
	sum recov_owninc_duration  , d
	replace recov_owninc_duration=20 if never_owninc==1
	gen h_recovinc=(recov_owninc_duration>0)
	gen h_never_owninc = (never_owninc==1)

	*~ recovery duration own net wealth 
	sum recov_hhwealth_duration, d
	replace recov_hhwealth_duration=20 if never_ownwealth==1
	sum recov_hhwealth_duration, d
	gen h_recovwealth=(recov_hhwealth_duration>=r(p50))
	
	*~ demo
	gen h_male = male
	gen h_bach = atleast_bachelor 
	gen h_empl_ft =  empl_ft
	tab svydate, gen(svydate_)
			
global controls 		ln_hhnetinc  ///
						ln_ofinwealth_lvl ln_retirewealth_lvl  ///
						ln_realestate_lvl realestJan20_NR		///
						ln_debt_lvl  debtJan20_NR ///
						stockinvestor riskshare_finwealth_Jan201 stockexperience ///
						 age_25_34 age_35_44 age_45_54 age_55_64 age_65 male married separated_divorced widowed ///	
						highschool some_college_associate_degree atleast_bachelor  ///
						mainearner_alone z_constrained self_empl retired unempl empl_other ///
						republican other_party NR_party  ///
						z_decisionmaker ///
						midwest northeast south ///
						svydate_2 svydate_3 svydate_4 svydate_5 svydate_6 svydate_7 svydate_8 ///
						control_fincrisis control_dotcom control_black
						
	foreach var of varlist  delhhnetinc_exp20_USD_tr02alt delhhnetinc_USD_tr02alt_qtr delretir_USD_tr02alt delofin_USD_tr02alt	{
		replace `var'=`var'/1000
	}


	foreach var of varlist expec_debthigher expec_morehrs expec_retirlater{
		replace `var'=100*`var' 
	}			

foreach x in age netinc_alt ofinwealth_lvl 	never_owninc constrained  male bach empl_ft  {
	foreach y in 0 1 {
		*** debt
			reg expec_debthigher /// 
										del_retir_perc_tr02 ///
										del_ofin_perc_tr02 ///
										del_hhnetinc_perc_tr02 ///
										$controls 		if h_`x'==`y' ///
										, robust
										
														
					margins, dydx(del_ofin_perc_tr02) post
					est store `x'_debt_ow_`y'	
			
			reg expec_debthigher /// 
										del_retir_perc_tr02 ///
										del_ofin_perc_tr02 ///
										del_hhnetinc_perc_tr02 ///
										$controls 		if h_`x'==`y' ///
										, robust
										
														
					margins, dydx(del_retir_perc_tr02) post
					est store `x'_debt_rw_`y'					
					
			reg expec_debthigher /// 
										del_retir_perc_tr02 ///
										del_ofin_perc_tr02 ///
										del_hhnetinc_perc_tr02 ///
										$controls 		if h_`x'==`y' ///
										, robust
										
														
					margins, dydx(del_hhnetinc_perc_tr02) post
					est store `x'_debt_inc_`y'					
									
					
		*** hrs								
			reg expec_morehrs /// 
										del_retir_perc_tr02 ///
										del_ofin_perc_tr02 ///
										del_hhnetinc_perc_tr02 ///
										$controls 		if h_`x'==`y' ///
										, robust				
										
										
					margins, dydx(del_ofin_perc_tr02) post
					est store `x'_hour_ow_`y'	
			
			reg expec_morehrs /// 
										del_retir_perc_tr02 ///
										del_ofin_perc_tr02 ///
										del_hhnetinc_perc_tr02 ///
										$controls 		if h_`x'==`y' ///
										, robust				
										
										
					margins, dydx(del_retir_perc_tr02) post
					est store `x'_hour_rw_`y'				
					
			reg expec_morehrs /// 
										del_retir_perc_tr02 ///
										del_ofin_perc_tr02 ///
										del_hhnetinc_perc_tr02 ///
										$controls 		if h_`x'==`y' ///
										, robust				
									
										
					margins, dydx(del_hhnetinc_perc_tr02) post
					est store `x'_hour_inc_`y'
		*** retire
		
			reg expec_retirlater /// 
										del_retir_perc_tr02 ///
										del_ofin_perc_tr02 ///
										del_hhnetinc_perc_tr02 ///
										$controls 		if h_`x'==`y' ///
										, robust				
										
					margins, dydx(del_ofin_perc_tr02) post
					est store `x'_retire_ow_`y'	
					
			reg expec_retirlater /// 
										del_retir_perc_tr02 ///
										del_ofin_perc_tr02 ///
										del_hhnetinc_perc_tr02 ///
										$controls 		if h_`x'==`y' ///
										, robust				
										
					margins, dydx(del_retir_perc_tr02) post
					est store `x'_retire_rw_`y'	
								
			reg expec_retirlater /// 
										del_retir_perc_tr02 ///
										del_ofin_perc_tr02 ///
										del_hhnetinc_perc_tr02 ///
										$controls 		if h_`x'==`y' ///
										, robust				
										
					margins, dydx(del_hhnetinc_perc_tr02) post
					est store `x'_retire_inc_`y'	
	}
}	
		
	* male	debt
		coefplot  	///
					(male_debt_rw_0, label(Female)  )		 ///
					(male_debt_rw_1, label(Male))		 ///
					, 	 coeflabel(del_retir_perc_tr02 = "Retirement wealth", labsize(medium))	recast(bar) vert  barwidth(0.3) ///
					vert ylabel(-.8(.2).2, nogrid) ciopts(recast(rcap)) citop  level(90) ysize(1) xsize(1) ///
					legend(off) saving(Figures/coeftemp1.gph, replace)
					
		coefplot  	///
					(male_debt_ow_0, label(Female)  )		 ///
					(male_debt_ow_1, label(Male))		 ///
					, 	coeflabel(del_ofin_perc_tr02 = "Other fin. wealth", labsize(medium))	recast(bar) vert  barwidth(0.3) ///
					vert ylabel(-.8(.2).2, nogrid labcolor(white) tlcolor(white)) yscale(noline axis(1)) ciopts(recast(rcap)) citop  level(90) ysize(1) xsize(1) ///
					legend(off) saving(Figures/coeftemp2.gph, replace)	
		
		coefplot  	///
					(male_debt_inc_0, label(Female)  )		 ///
					(male_debt_inc_1, label(Male))		 ///
					, 	coeflabel(del_hhnetinc_perc_tr02 = "Income", labsize(medium))	recast(bar) vert  barwidth(0.3) ///
					vert  ylabel(-.8(.2).2, nogrid labcolor(white) tlcolor(white)  ) yscale(noline axis(1)) ciopts(recast(rcap)) citop  level(90) ysize(1) xsize(1) ///
					legend(off) saving(Figures/coeftemp3.gph, replace)	
								
		graph combine 	Figures/coeftemp1.gph ///
					Figures/coeftemp2.gph ///
					Figures/coeftemp3.gph ///
					, cols(3) rows(1) ysize(1) xsize(3) /// 
					note("Gender", pos(12) size(medium)) ///
					saving(Figures/coef_1.gph, replace) imargin(-20 0 0 0)	///
					l1title("Incr. exp. debt", size(small) xoffset(-2.5)) 
			
			
		
	* male	hours
		coefplot  	///
					(male_hour_rw_0, label(Female)  )		 ///
					(male_hour_rw_1, label(Male))		 ///
					, 	 coeflabel(del_retir_perc_tr02 = "Retirement wealth", labsize(medium))	recast(bar) vert  barwidth(0.3) ///
					vert ylabel(-.8(.2).2, nogrid) ciopts(recast(rcap)) citop  level(90) ysize(1) xsize(1) ///
					legend(off)  saving(Figures/coeftemp1.gph, replace)
					
		coefplot  	///
					(male_hour_ow_0, label(Female)  )		 ///
					(male_hour_ow_1, label(Male))		 ///
					, 	coeflabel(del_ofin_perc_tr02 = "Other fin. wealth", labsize(medium))	recast(bar) vert  barwidth(0.3) ///
					vert ylabel(-.8(.2).2, nogrid labcolor(white) tlcolor(white)) yscale(noline axis(1)) ciopts(recast(rcap)) citop  level(90) ysize(1) xsize(1) ///
					legend(off) saving(Figures/coeftemp2.gph, replace)	
		
		coefplot  	///
					(male_hour_inc_0, label(Female)  )		 ///
					(male_hour_inc_1, label(Male))		 ///
					, 	coeflabel(del_hhnetinc_perc_tr02 = "Income", labsize(medium))	recast(bar) vert  barwidth(0.3) ///
					vert  ylabel(-.8(.2).2, nogrid labcolor(white) tlcolor(white)  ) yscale(noline axis(1)) ciopts(recast(rcap)) citop  level(90) ysize(1) xsize(1) ///
					legend(off) saving(Figures/coeftemp3.gph, replace)	
								
		graph combine 	Figures/coeftemp1.gph ///
					Figures/coeftemp2.gph ///
					Figures/coeftemp3.gph ///
					, cols(3) rows(1) ysize(1) xsize(3) ///
					saving(Figures/coef_2.gph, replace) imargin(-20 0 0 0) xcommon ycommon ///
					l1title("Incr. exp. desired hours", size(small) xoffset(-2.5)) 
			
			
	* male	retire
		coefplot  	///
					(male_retire_rw_0, label(Female)  )		 ///
					(male_retire_rw_1, label(Male))		 ///
					, 	 coeflabel(del_retir_perc_tr02 = "Retirement wealth", labsize(medium))	recast(bar) vert  barwidth(0.3) ///
					vert ylabel(-.8(.2).2, nogrid) ciopts(recast(rcap)) citop  level(90) ysize(1) xsize(1) ///
					legend(size(medsmall) symxsize(5) bmargin(tiny) yoffset(0) pos(6) ring(1) cols(1) )  saving(Figures/coeftemp1.gph, replace)
					
		coefplot  	///
					(male_retire_ow_0, label(Female)  )		 ///
					(male_retire_ow_1, label(Male))		 ///
					, 	coeflabel(del_ofin_perc_tr02 = "Other fin. wealth", labsize(medium))	recast(bar) vert  barwidth(0.3) ///
					vert ylabel(-.8(.2).2, nogrid labcolor(white) tlcolor(white)) yscale(noline axis(1)) ciopts(recast(rcap)) citop  level(90) ysize(1) xsize(1) ///
					legend(size(small) symxsize(5) bmargin(tiny) yoffset(0) pos(6) ring(1) cols(2)) saving(Figures/coeftemp2.gph, replace)	
		
		coefplot  	///
					(male_retire_inc_0, label(Female)  )		 ///
					(male_retire_inc_1, label(Male))		 ///
					, 	coeflabel(del_hhnetinc_perc_tr02 = "Income", labsize(medium))	recast(bar) vert  barwidth(0.3) ///
					vert  ylabel(-.8(.2).2, nogrid labcolor(white) tlcolor(white)  ) yscale(noline axis(1)) ciopts(recast(rcap)) citop  level(90) ysize(1) xsize(1) ///
					legend(size(small) symxsize(5) bmargin(tiny) yoffset(0) pos(6) ring(1) cols(2)) saving(Figures/coeftemp3.gph, replace)	
								
		grc1leg2 	Figures/coeftemp1.gph ///
					Figures/coeftemp2.gph ///
					Figures/coeftemp3.gph ///
					, cols(3) rows(1) ysize(1) xsize(3) ///
					ring(1) pos(6) l1title("", size(small)) ///
					legendfrom(Figures/coeftemp1.gph) span  ///
					saving(Figures/coef_3.gph, replace) imargin(-20 0 0 0) xcommon ycommon ///
					l1title("Incr. exp. retirement age", size(small) xoffset(-2.5)) 
	
	* atleast_bachelor	debt
		coefplot  	///
					(bach_debt_rw_0, label(High school)  )		 ///
					(bach_debt_rw_1, label(At least bach.))		 ///
					, 	 coeflabel(del_retir_perc_tr02 = "Retirement wealth", labsize(medium))	recast(bar) vert  barwidth(0.3) ///
					vert ylabel(-1(.25).25, nogrid) ciopts(recast(rcap)) citop  level(90) ysize(1) xsize(1) ///
					legend(off) saving(Figures/coeftemp1.gph, replace)
					
		coefplot  	///
					(bach_debt_ow_0, label(High school)  )		 ///
					(bach_debt_ow_1, label(At least bach.))		 ///
					, 	coeflabel(del_ofin_perc_tr02 = "Other fin. wealth", labsize(medium))	recast(bar) vert  barwidth(0.3) ///
					vert ylabel(-1(.25).25, nogrid labcolor(white) tlcolor(white)) yscale(noline axis(1)) ciopts(recast(rcap)) citop  level(90) ysize(1) xsize(1) ///
					legend(off) saving(Figures/coeftemp2.gph, replace)	
		
		coefplot  	///
					(bach_debt_inc_0, label(High school)  )		 ///
					(bach_debt_inc_1, label(At least bach.))		 ///
					, 	coeflabel(del_hhnetinc_perc_tr02 = "Income", labsize(medium))	recast(bar) vert  barwidth(0.3) ///
					vert  ylabel(-1(.25).25, nogrid labcolor(white) tlcolor(white)  ) yscale(noline axis(1)) ciopts(recast(rcap)) citop  level(90) ysize(1) xsize(1) ///
					legend(off) saving(Figures/coeftemp3.gph, replace)	
								
		graph combine 	Figures/coeftemp1.gph ///
					Figures/coeftemp2.gph ///
					Figures/coeftemp3.gph ///
					, cols(3) rows(1) ysize(1) xsize(3) /// 
					note("Education", pos(12) size(medium)) ///
					saving(Figures/coef_4.gph, replace) imargin(-10 0 0 0)  xcommon ycommon 	
					*l1title("Incr. exp. debt", size(small)) 
			
	* netinc	hours
		coefplot  	///
					(bach_hour_rw_0, label(High school)  )		 ///
					(bach_hour_rw_1, label(At least bach.))		 ///
					, 	 coeflabel(del_retir_perc_tr02 = "Retirement wealth", labsize(medium))	recast(bar) vert  barwidth(0.3) ///
					vert ylabel(-1(.25).25, nogrid) ciopts(recast(rcap)) citop  level(90) ysize(1) xsize(1) ///
					legend(off)  saving(Figures/coeftemp1.gph, replace)
					
		coefplot  	///
					(bach_hour_ow_0, label(High school)  )		 ///
					(bach_hour_ow_1, label(Above med.))		 ///
					, 	coeflabel(del_ofin_perc_tr02 = "Other fin. wealth", labsize(medium))	recast(bar) vert  barwidth(0.3) ///
					vert ylabel(-1(.25).25, nogrid labcolor(white) tlcolor(white)) yscale(noline axis(1)) ciopts(recast(rcap)) citop  level(90) ysize(1) xsize(1) ///
					legend(off) saving(Figures/coeftemp2.gph, replace)	
		
		coefplot  	///
					(bach_hour_inc_0, label(High school)  )		 ///
					(bach_hour_inc_1, label(Above med.))		 ///
					, 	coeflabel(del_hhnetinc_perc_tr02 = "Income", labsize(medium))	recast(bar) vert  barwidth(0.3) ///
					vert  ylabel(-1(.25).25, nogrid labcolor(white) tlcolor(white)  ) yscale(noline axis(1)) ciopts(recast(rcap)) citop  level(90) ysize(1) xsize(1) ///
					legend(off) saving(Figures/coeftemp3.gph, replace)	
								
		graph combine 	Figures/coeftemp1.gph ///
					Figures/coeftemp2.gph ///
					Figures/coeftemp3.gph ///
					, cols(3) rows(1) ysize(1) xsize(3) ///
					saving(Figures/coef_5.gph, replace) imargin(-10 0 0 0) xcommon ycommon 
					*l1title("Incr. exp. desired hours", size(small)) 
			
			
	* netinc	retire
		coefplot  	///
					(bach_retire_rw_0, label(Below bachelor)  )		 ///
					(bach_retire_rw_1, label(At least bachelor))		 ///
					, 	 coeflabel(del_retir_perc_tr02 = "Retirement wealth", labsize(medium))	recast(bar) vert  barwidth(0.3) ///
					vert ylabel(-1(.25).25, nogrid) ciopts(recast(rcap)) citop  level(90) ysize(1) xsize(1) ///
					legend(size(medsmall) symxsize(5) bmargin(tiny) yoffset(0) pos(6) ring(1) cols(1) )  saving(Figures/coeftemp1.gph, replace)
					
		coefplot  	///
					(bach_retire_ow_0, label(Below med.)  )		 ///
					(bach_retire_ow_1, label(Above med.))		 ///
					, 	coeflabel(del_ofin_perc_tr02 = "Other fin. wealth", labsize(medium))	recast(bar) vert  barwidth(0.3) ///
					vert ylabel(-1(.25).25, nogrid labcolor(white) tlcolor(white)) yscale(noline axis(1)) ciopts(recast(rcap)) citop  level(90) ysize(1) xsize(1) ///
					legend(size(small) symxsize(5) bmargin(tiny) yoffset(0) pos(6) ring(1) cols(2)) saving(Figures/coeftemp2.gph, replace)	
		
		coefplot  	///
					(bach_retire_inc_0, label(Below med.)  )		 ///
					(bach_retire_inc_1, label(Above med.))		 ///
					, 	coeflabel(del_hhnetinc_perc_tr02 = "Income", labsize(medium))	recast(bar) vert  barwidth(0.3) ///
					vert  ylabel(-1(.25).25, nogrid labcolor(white) tlcolor(white)  ) yscale(noline axis(1)) ciopts(recast(rcap)) citop  level(90) ysize(1) xsize(1) ///
					legend(size(small) symxsize(5) bmargin(tiny) yoffset(0) pos(6) ring(1) cols(2)) saving(Figures/coeftemp3.gph, replace)	
								
		grc1leg2 	Figures/coeftemp1.gph ///
					Figures/coeftemp2.gph ///
					Figures/coeftemp3.gph ///
					, cols(3) rows(1) ysize(1) xsize(3) ///
					ring(1) pos(6) l1title("", size(small)) ///
					legendfrom(Figures/coeftemp1.gph) span  ///
					saving(Figures/coef_6.gph, replace) imargin(-10 0 0 0) xcommon ycommon 
					*l1title("Incr. exp. retirement age", size(small)) 
								
		
		
					
	* empl_ft	debt
		coefplot  	///
					(empl_ft_debt_rw_0, label(Zero)  )		 ///
					(empl_ft_debt_rw_1, label(Positive))		 ///
					, 	 coeflabel(del_retir_perc_tr02 = "Retirement wealth", labsize(medium))	recast(bar) vert  barwidth(0.3) ///
					vert ylabel(-.8(.2).2, nogrid) ciopts(recast(rcap)) citop  level(90) ysize(1) xsize(1) ///
					legend(off) saving(Figures/coeftemp1.gph, replace)
					
		coefplot  	///
					(empl_ft_debt_ow_0, label(Zero)  )		 ///
					(empl_ft_debt_ow_1, label(Positive))		 ///
					, 	coeflabel(del_ofin_perc_tr02 = "Other fin. wealth", labsize(medium))	recast(bar) vert  barwidth(0.3) ///
					vert ylabel(-.8(.2).2, nogrid labcolor(white) tlcolor(white)) yscale(noline axis(1)) ciopts(recast(rcap)) citop  level(90) ysize(1) xsize(1) ///
					legend(off) saving(Figures/coeftemp2.gph, replace)	
		
		coefplot  	///
					(empl_ft_debt_inc_0, label(Zero)  )		 ///
					(empl_ft_debt_inc_1, label(Positive))		 ///
					, 	coeflabel(del_hhnetinc_perc_tr02 = "Income", labsize(medium))	recast(bar) vert  barwidth(0.3) ///
					vert  ylabel(-.8(.2).2, nogrid labcolor(white) tlcolor(white)  ) yscale(noline axis(1)) ciopts(recast(rcap)) citop  level(90) ysize(1) xsize(1) ///
					legend(off) saving(Figures/coeftemp3.gph, replace)	
								
		graph combine 	Figures/coeftemp1.gph ///
					Figures/coeftemp2.gph ///
					Figures/coeftemp3.gph ///
					, cols(3) rows(1) ysize(1) xsize(3) /// 
					note("Employment", pos(12) size(medium)) ///
					saving(Figures/coef_7.gph, replace) imargin(-20 0 0 0)  xcommon ycommon 	 
					*l1title("Incr. exp. debt", size(small)) 
			
		
	* ofinwealth_lvl	hours
		coefplot  	///
					(empl_ft_hour_rw_0, label(Zero)  )		 ///
					(empl_ft_hour_rw_1, label(Positive))		 ///
					, 	 coeflabel(del_retir_perc_tr02 = "Retirement wealth", labsize(medium))	recast(bar) vert  barwidth(0.3) ///
					vert ylabel(-.8(.2).2, nogrid) ciopts(recast(rcap)) citop  level(90) ysize(1) xsize(1) ///
					legend(off)  saving(Figures/coeftemp1.gph, replace)
					
		coefplot  	///
					(empl_ft_hour_ow_0, label(Below med.)  )		 ///
					(empl_ft_hour_ow_1, label(Above med.))		 ///
					, 	coeflabel(del_ofin_perc_tr02 = "Other fin. wealth", labsize(medium))	recast(bar) vert  barwidth(0.3) ///
					vert ylabel(-.8(.2).2, nogrid labcolor(white) tlcolor(white)) yscale(noline axis(1)) ciopts(recast(rcap)) citop  level(90) ysize(1) xsize(1) ///
					legend(off) saving(Figures/coeftemp2.gph, replace)	
		
		coefplot  	///
					(empl_ft_hour_inc_0, label(Below med.)  )		 ///
					(empl_ft_hour_inc_1, label(Above med.))		 ///
					, 	coeflabel(del_hhnetinc_perc_tr02 = "Income", labsize(medium))	recast(bar) vert  barwidth(0.3) ///
					vert  ylabel(-.8(.2).2, nogrid labcolor(white) tlcolor(white)  ) yscale(noline axis(1)) ciopts(recast(rcap)) citop  level(90) ysize(1) xsize(1) ///
					legend(off) saving(Figures/coeftemp3.gph, replace)	
								
		graph combine 	Figures/coeftemp1.gph ///
					Figures/coeftemp2.gph ///
					Figures/coeftemp3.gph ///
					, cols(3) rows(1) ysize(1) xsize(3) ///
					saving(Figures/coef_8.gph, replace) imargin(-20 0 0 0) xcommon ycommon 
					*l1title("Incr. exp. desired hours", size(small)) 
			
			
	* ofinwealth_lvl	retire
		coefplot  	///
					(empl_ft_retire_rw_0, label(All others)  )		 ///
					(empl_ft_retire_rw_1, label(Full time employment))		 ///
					, 	 coeflabel(del_retir_perc_tr02 = "Retirement wealth", labsize(medium))	recast(bar) vert  barwidth(0.3) ///
					vert ylabel(-.8(.2).2, nogrid) ciopts(recast(rcap)) citop  level(90) ysize(1) xsize(1) ///
					legend(size(medsmall) symxsize(5) bmargin(tiny) yoffset(0) pos(6) ring(1) cols(1) )  saving(Figures/coeftemp1.gph, replace)
					
		coefplot  	///
					(empl_ft_retire_ow_0, label(Below med.)  )		 ///
					(empl_ft_retire_ow_1, label(Above med.))		 ///
					, 	coeflabel(del_ofin_perc_tr02 = "Other fin. wealth", labsize(medium))	recast(bar) vert  barwidth(0.3) ///
					vert ylabel(-.8(.2).2, nogrid labcolor(white) tlcolor(white)) yscale(noline axis(1)) ciopts(recast(rcap)) citop  level(90) ysize(1) xsize(1) ///
					legend(size(small) symxsize(5) bmargin(tiny) yoffset(0) pos(6) ring(1) cols(2)) saving(Figures/coeftemp2.gph, replace)	
		
		coefplot  	///
					(empl_ft_retire_inc_0, label(Below med.)  )		 ///
					(empl_ft_retire_inc_1, label(Above med.))		 ///
					, 	coeflabel(del_hhnetinc_perc_tr02 = "Income", labsize(medium))	recast(bar) vert  barwidth(0.3) ///
					vert  ylabel(-.8(.2).2, nogrid labcolor(white) tlcolor(white)  ) yscale(noline axis(1)) ciopts(recast(rcap)) citop  level(90) ysize(1) xsize(1) ///
					legend(size(small) symxsize(5) bmargin(tiny) yoffset(0) pos(6) ring(1) cols(2)) saving(Figures/coeftemp3.gph, replace)	
								
		grc1leg2 	Figures/coeftemp1.gph ///
					Figures/coeftemp2.gph ///
					Figures/coeftemp3.gph ///
					, cols(3) rows(1) ysize(1) xsize(3) ///
					ring(1) pos(6) l1title("", size(small)) ///
					legendfrom(Figures/coeftemp1.gph) span  ///
					saving(Figures/coef_9.gph, replace) imargin(-20 0 0 0) xcommon ycommon 
					*l1title("Incr. exp. retirement age", size(small)) 
						
					
		graph combine 	Figures/coef_1.gph ///
						Figures/coef_4.gph ///
						Figures/coef_7.gph ///
						Figures/coef_2.gph ///
						Figures/coef_5.gph ///
						Figures/coef_8.gph ///
						Figures/coef_3.gph ///
						Figures/coef_6.gph ///
						Figures/coef_9.gph ///
						, cols(3) rows(3) ysize(3) xsize(5) ///
						iscale(.64)

	
	graph export	Figures/FigureA10.pdf, as(pdf) fontface(cmr10) replace	
	graph export 	Figures/FigureA10.png, width(1600) replace	
	

forvalues x = 1/9 {
		capture erase Figures/coef_`x'.gph
		capture erase Figures/coeftemp`x'.gph
}		
			
